import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/admin/checkField/page',
    method: 'get',
    params: query
  })
}

export function fetchField(query) {
  return request({
    url: '/admin/checkField/tree',
    method: 'get',
    params: query
  })
}

export function listByOption(id) {
  return request({
    url: '/admin/checkField/listByOption/'+id,
    method: 'get'
  })
}

export function listByIds(obj) {
  return request({
    url: '/admin/checkField/listByIds',
    method: 'post',
    data: obj
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/checkField',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/checkField/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/admin/checkField/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/checkField',
    method: 'put',
    data: obj
  })
}

export function validateExists(obj) {
  return request({
    url: '/admin/validateExists',
    method: 'put',
    data:obj
  })
}
